//
//  VideoModel.m
//  XIWenLeJian
//
//  Created by lanou3g on 15/11/12.
//  Copyright © 2015年 蓝足. All rights reserved.
//

#import "VideoModel.h"

@implementation VideoModel

- (void)setValue:(id)value forUndefinedKey:(NSString *)key
{
    if ([key isEqualToString:@"id"]) {
        self.ID = [value intValue];
    }
}

- (instancetype)initWithDict:(NSDictionary *)dict
{
    self = [super init];
    if (self) {
        [self setValuesForKeysWithDictionary:dict];
    }
    return self;
}

+ (instancetype)freshWithDict:(NSDictionary *)dict
{
    return [[self alloc]initWithDict:dict];
}

+(NSArray *)freshListArray:(NSMutableArray *)array
{
    NSMutableArray *listArray = [NSMutableArray array];
    for (NSDictionary *dic in array) {
        [listArray addObject:[self freshWithDict:dic]];
    }
    return listArray;
}

@end
